@extends('admin.layout.basic')
@section('content')
        <!-- 面包屑 -->
@include('admin.layout.breadcrumb')
<div class="wrapper wrapper-content animated fadeInUp">


    <div class="row">



      <div class="col-lg-3">
        <div class="ibox ">
          <div class="ibox-title">
            <h5>{{trans("admin/message.filecontents_list")}}</h5>
            <div class="ibox-tools">
              <a onclick="admin_filecontents_list.addClick()" class="btn btn-primary btn-xs" data-toggle="tooltip" data-placement="top" title="添加"><i class="fa fa-plus"></i></a>
            </div>

          </div>
          <div class="ibox-content">

            <p class="m-b-lg">
              {{trans("admin/message.filecontents_list_desc")}}
            </p>

            <div class="dd" id="nestable">

            </div>
            <div class="m-t-md">

            </div>


          </div>
        </div>
      </div>


        <div class="col-lg-9">
          <div class="ibox">
            <div class="ibox-title">
              <h5>内容编辑</h5>
              <div class="ibox-tools">
                <a id="p_save" onclick="admin_filecontents_list.saveSubmit()" class="btn btn-success btn-xs" data-toggle="tooltip" data-placement="top" title="保存"><i class="fa fa-check"></i></a>
                <a id="p_showhistory" fileid ="" onclick="admin_filecontents_list.showHistorylist()" class="btn btn-warning btn-xs" data-toggle="tooltip" data-placement="top" title="历史版本"><i class="fa fa-list-ul"></i></a>
                <a id="p_view"  target="_blank" class="btn btn-primary btn-xs" data-toggle="tooltip" data-placement="top" title="预览"><i class="fa fa-eye"></i></a>
                <a id="p_delete" editeid ="" onclick="admin_filecontents_list.delete()" class="btn btn-danger btn-xs" data-toggle="tooltip" data-placement="top" title="删除"><i class="fa fa-trash"></i></a>

              </div>

            </div>
            <div id="fileeditcontent" class="ibox-content">
              <input type="hidden"  id="id" value="{{isset($content)? $content->id:""}}" name="id">
              <input type="hidden" id="parent_id"   name="parent_id">
              <fieldset class="form-horizontal">


                <div class="col-sm-6">
                  <div class="form-group"><label class="col-sm-4 control-label">{{trans("admin/message.filecontents_title")}}:</label>
                    <div class="col-sm-8"><input type="text" id="title"     name="title" class="form-control"></div>
                  </div>
                </div>

                <div class="col-sm-6">
                  <div class="form-group"><label class="col-sm-4 control-label">{{trans("admin/message.filecontents_name")}}:</label>
                    <div class="col-sm-8"><input type="text" id="name"   name="name" class="form-control"></div>
                  </div>
                </div>

                <div class="col-sm-6">
                  <div class="form-group"><label class="col-sm-4 control-label">{{trans("admin/message.filecontents_parent")}}:</label>
                    <div class="col-sm-6"><input type="text" id="parent_name"    disabled  name="parent_name" class="form-control"></div>
                    <button type="button" onclick="admin_filecontents_list.openModel()" class="btn btn-success">{{trans("admin/message.chose")}}</button>
                  </div>
                </div>

                <div class="col-sm-6">
                  <div class="form-group"><label class="col-sm-4 control-label">选择模板:</label>
                    <div class="col-sm-8">
                      <select   id="template"   name="template" class="form-control">
                        @foreach($templates as $tl)
                          <option value="{{$tl['key']}}">{{$tl['name']}}</option>
                        @endforeach
                      </select>
                    </div>
                  </div>
                </div>



                <div class="col-sm-6">
                  <div class="form-group"><label class="col-sm-4 control-label">{{trans("admin/message.use_meta_check")}}:</label>
                    <div class="col-sm-8">
                      <div class="i-checks"><label> <input type="checkbox" id="use_seo" name="use_seo" {{ isset($post) ? ($post->use_seo == 1? "checked":"") : '' }} ></label></div> </div>
                  </div>
                </div>

                <div class="col-sm-6">
                  <div class="form-group"><label class="col-sm-4 control-label">{{trans("admin/message.filecontents_is_show")}}:</label>
                    <div class="col-sm-8">
                      <div class="i-checks"><label> <input type="checkbox" id="is_show"
                                                           name="is_show" checked  ></label></div> </div>
                  </div>
                </div>

                  <div class="form-group"><label class="col-sm-2 control-label">{{trans("admin/message.seo_title")}}:</label>
                    <div class="col-sm-10"><input type="text" name="seo_title" class="form-control"    ></div>
                  </div>
                  <div class="form-group"><label class="col-sm-2 control-label">{{trans("admin/message.seo_description")}}:</label>
                    <div class="col-sm-10"><input type="text" name="seo_description" class="form-control"   ></div>
                  </div>
                  <div class="form-group"><label class="col-sm-2 control-label">{{trans("admin/message.seo_keywords")}}:</label>
                    <div class="col-sm-10"><input type="text" name="seo_keywords" class="form-control"  ></div>
                  </div>
                  <div class="form-group"><label class="col-sm-2 control-label">{{trans("admin/message.seo_other_meta")}}:</label>
                    <div class="col-sm-10"><textarea type="text" name="seo_meta" class="form-control"  > </textarea> </div>
                  </div>

                <div class="col-sm-12">
                  <div class="hr-line-dashed"></div>
                <div class="form-group"><label class="col-sm-2 control-label">{{trans("admin/message.site_content_edit_content")}}:</label>
                  <div class="col-sm-10">
                    <div id="file_content" class="summernote">
                    </div>
                  </div>

                </div>

              </fieldset>

            </div>


            <div class="col-lg-12 ibox-content  text-center">

              <button type="button" onclick="admin_filecontents_list.saveSubmit()" class="btn btn-w-m btn-success">{{ trans('admin/message.submit') }}</button>
{{--              <button   type="button" style="display: {{isset($content)? "inline":"none"}}"   onclick="admin_fileedit_list.delete('{{isset($content)?  $content->id:""}}')"class="btn btn-w-m btn-danger">{{ trans('admin/message.delete') }}</button>--}}
            </div>

          </div>
        </div>





      {{--@include("admin.sys.modules.contentParent")--}}


    </div>
</div>

@include('admin.sys.modules.contentParent')
@include('admin.sys.modules.filecontentHistory')
@endsection


